import Rrequest from '@/util/Rrequest'

export async function bootbannergetBannerList(data) {
	return Rrequest({
		url: '/boot/banner/getBannerList/' + data,
		method: 'get'
	})
}

export async function bootgoodsselectpage(data) {
	return Rrequest({
		url: '/boot/goods/select/page',
		method: 'post',
		data
	})
}

export async function bootgoodsselectdetail(data) {
	return Rrequest({
		url: '/boot/goods/select/detail/' + data,
		method: 'post',
		data
	})
}

export async function bootgoodsselectgoodsSpecifications(data) {
	return Rrequest({
		url: '/boot/goods/select/goodsSpecifications/' + data,
		method: 'post',
		data
	})
}

export async function bootgoodsSpecificationsNumselectNum(id, data) {
	return Rrequest({
		url: '/boot/goodsSpecificationsNum/selectNum/' + id,
		method: 'post',
		data
	})
}

export async function bootreceivingAddressselectdefault() {
	return Rrequest({
		url: '/boot/receivingAddress/select/default',
		method: 'post'
	})
}

export async function bootreceivingAddressselectpage(data) {
	return Rrequest({
		url: '/boot/receivingAddress/select/page',
		method: 'post',
		data
	})
}

export async function bootdistrictselect(data) {
	return Rrequest({
		url: '/boot/district/select/' + data,
		method: 'post'
	})
}

export async function bootreceivingAddressinsert(data) {
	return Rrequest({
		url: '/boot/receivingAddress/insert',
		method: 'post',
		data
	})
}

export async function bootreceivingAddressselectdetail(data) {
	return Rrequest({
		url: '/boot/receivingAddress/select/detail/' + data,
		method: 'post',
		data
	})
}

export async function bootreceivingAddressupdate(data) {
	return Rrequest({
		url: '/boot/receivingAddress/update',
		method: 'put',
		data
	})
}

export async function bootreceivingAddressdelete(data) {
	return Rrequest({
		url: '/boot/receivingAddress/delete/' + data,
		method: 'delete',
		data
	})
}

//电费话费充值 
export async function phrecharge(data) {
	return Rrequest({
		url: '/recharge/rechargeRecord',
		method: 'post',
		data: data
	})
}

//获取折扣
export async function rechargediscount(data) {
	return Rrequest({
		url: '/recharge/discount/' + data,
		method: 'get',
	})
}

//添加油卡
export async function oilinsertcard(data) {
	return Rrequest({
		url: '/boot/oil/card/insert',
		method: 'post',
		data: data
	})
}

//获取美团转链
export async function meituangenerateLink(data) {
	return Rrequest({
		url: '/meituan/generateLink',
		method: 'post',
		data: data
	})
}

export async function bootorderinsert(data) {
	return Rrequest({
		url: '/boot/order/insert',
		method: 'post',
		data
	})
}

export async function bootorderselectdetail(data) {
	return Rrequest({
		url: '/boot/order/select/detail/' + data,
		method: 'post',
		data
	})
}

export async function bootorderpay(id, data) {
	return Rrequest({
		url: '/boot/order/pay/' + id,
		method: 'post',
		data
	})
}

export async function bootshoppingCartinsert(data) {
	return Rrequest({
		url: '/boot/shoppingCart/insert',
		method: 'post',
		data
	})
}

export async function bootshoppingCartselectpage(data) {
	return Rrequest({
		url: '/boot/shoppingCart/select/page',
		method: 'post',
		data
	})
}

export async function bootshoppingCartdelete(data) {
	return Rrequest({
		url: '/boot/shoppingCart/delete/' + data,
		method: 'delete',
		data
	})
}

export async function bootshoppingCartselectlist(data) {
	return Rrequest({
		url: '/boot/shoppingCart/select/list',
		method: 'post',
		data
	})
}

export async function bootorderinsertBatch(data) {
	return Rrequest({
		url: '/boot/order/insertBatch',
		method: 'post',
		data
	})
}

export async function bootordergetMoney(data) {
	return Rrequest({
		url: '/boot/order/getMoney',
		method: 'post',
		data
	})
}
export async function bootorderpayBatch(data) {
	return Rrequest({
		url: '/boot/order/payBatch',
		method: 'post',
		data
	})
}
export async function bootgoodsTypeselectpage(data) {
	return Rrequest({
		url: '/boot/goodsType/select/page',
		method: 'post',
		data
	})
}

export async function bootgoodsTypeselect(data) {
	return Rrequest({
		url: '/boot/goodsType/select',
		method: 'post',
		data
	})
}


export async function taobaolist(data) {
	return Rrequest({
		url: '/taobao/list',
		method: 'post',
		data
	})
}


export async function taobaodetail(data) {
	return Rrequest({
		url: '/taobao/detail/' + data,
		method: 'get'
	})
}


export async function taobaoorder(data) {
	return Rrequest({
		url: '/taobao/order/' + data,
		method: 'get'
	})
}


export async function taobaoauthorizationverify(data) {
	return Rrequest({
		url: '/taobao/authorization/verify',
		method: 'get'
	})
}

export async function taobaoauthorization(data) {
	return Rrequest({
		url: '/taobao/authorization',
		method: 'put',
		data
	})
}
// 京东列表
export async function bootjingdonglist(data) {
	return Rrequest({
		url: '/boot/jingdong/list',
		method: 'POST',
		data
	})
}
export async function bootjingdongdetail(data) {
	return Rrequest({
		url: '/boot/jingdong/detail/' + data,
		method: 'get'
	})
}

export async function bootjingdongorder(data) {
	return Rrequest({
		url: '/boot/jingdong/order/' + data,
		method: 'get'
	})
}


export async function weipinhuigetGoods(data) {
	return Rrequest({
		url: '/weipinhui/getGoods',
		method: 'post',
		data
	})
}

export async function weipinhuigetGoodsDetails(data) {
	return Rrequest({
		url: '/weipinhui/getGoodsDetails',
		method: 'post',
		data
	})
}

export async function weipinhuimoveLink(data) {
	return Rrequest({
		url: '/weipinhui/moveLink',
		method: 'post',
		data
	})
}

export async function taobaoele(data) {
	return Rrequest({
		url: '/taobao/ele/' + data,
		method: 'get'
	})
}

//充值开关
export async function getPhoneOffOrOn() {
	return Rrequest({
		url: '/boot/sysConfig/getPhoneOffOrOn',
		method: 'get'
	})
}
export async function invitationcode(data) {
	return Rrequest({
		url: '/invitation/code',
		method: 'get',
		data
	})
}

// export async function bootbulletinBoardgetBulletinBoardList(data) {
// 	return Rrequest({
// 		url: '/boot/bulletinBoard/getBulletinBoardList',
// 		method: 'post',
// 		data
// 	})
// }

export async function bootbulletinBoardgetBulletinBoardList(data) {
	return Rrequest({
		url: '/boot/bulletinBoard/getbulletinBoardRecord',
		method: 'post',
		data
	})
}



export async function bootsysConfigcommissionpercent(data) {
	return Rrequest({
		url: '/boot/sysConfig/commission/percent',
		method: 'get',
		data
	})
}

export async function bootsysConfigdata(typestr) {
	return Rrequest({
		url: '/boot/sysConfig/data/' + typestr,
		method: 'get',
	})
}

export async function bootjingdongcategory(typestr) {
	return Rrequest({
		url: '/boot/jingdong/category',
		method: 'get',
	})
}

export async function appversioncheck(data) {
	return Rrequest({
		url: '/app/version/check',
		method: 'post',
		data
	})
}

export async function preferredgoodslist(data) {
	return Rrequest({
		url: '/preferred/goods/list',
		method: 'post',
		data
	})
}

export async function taobaopreferredlist(data) {
	return Rrequest({
		url: '/taobao/preferred/list',
		method: 'post',
		data
	})
}

export async function goodsselectdetail(data) {
	return Rrequest({
		url: '/boot/goods/select/detail/' + data,
		method: 'post'
	})
}
export async function apicouponlist(data) {
	return Rrequest({
		url: '/api/coupon/list',
		method: 'get'
	})
}

//收藏商品
export async function goodcollectioncreate(data) {
	return Rrequest({
		url: '/boot/good-collection/create',
		method: 'post',
		data
	})
}

//取消收藏商品
export async function goodcollectiondelete(data) {
	return Rrequest({
		url: '/boot/good-collection/delete',
		method: 'get',
		params: data
	})
}

// 查询是否收藏
export async function goodcollectioncheck(data) {
	return Rrequest({
		url: '/boot/goods/collection',
		method: 'get',
		params: data
	})
}

//收藏商品列表
export async function goodcollectionlist(data) {
	return Rrequest({
		url: '/boot/good-collection/list',
		method: 'post',
		data
	})
}

//获取pdd分类
export async function pddgoodscats(data) {
	return Rrequest({
		url: '/pdd/goods/cats',
		method: 'get'
	})
}

// pdd商品列表
export async function pddgoodssearch(data) {
	return Rrequest({
		url: '/pdd/goods/search',
		method: 'post',
		data: data
	})
}

// pdd商品详情
export async function pddgoodsdetail(data) {
	return Rrequest({
		url: '/pdd/goods/detail',
		method: 'post',
		data: data
	})
}

// pdd查询是否绑定
export async function pddmemberauthority() {
	return Rrequest({
		url: '/pdd/member/authority/query',
		method: 'get'
	})
}

// pdd生成备案绑定链接
export async function pddgenerateurl() {
	return Rrequest({
		url: '/pdd/rp/prom/url/generate',
		method: 'post'
	})
}

// pdd推广链接生成
export async function pddgoodspromotionurl(data) {
	return Rrequest({
		url: '/pdd/goods/promotion/url/generate',
		method: 'post',
		data: data
	})
}

//pdd订单列表
export async function pddorderlist(data) {
	return Rrequest({
		url: '/pdd/order/list/' + data,
		method: 'post'
	})
}

//pdd订单详情
export async function pddorderdetail(data) {
	return Rrequest({
		url: '/pdd/order/detail/' + data,
		method: 'get'
	})
}